home *** CD-ROM | disk | FTP | other *** search
/ Hráč 2004 August / Hrac_72_2004-08_dvd.iso / dema / Rapid Gun / rg_setup.exe / common / global.fx < prev    next >
Text File  |  2004-04-19  |  2KB  |  75 lines

  1. // LF2 Engine
  2. // (C) 2002-3 7FX
  3. //---------------------------------------------------------------------------
  4. // Desc
  5. string desc : Description = "Global shader, ktery definuje defaultni render states.";
  6. // Shader type global
  7. string type : Type = "global"; 
  8. //---------------------------------------------------------------------------
  9. // Parameters for global effect
  10. // FillMode - POINT=1, WIREFRAME=2, SOLID=3
  11. int fill_mode : FillMode = 3; // default solid
  12. // CullMode - NONE=1, CW=2, CCW=3
  13. int cull_mode : CullMode = 3; // default CCW - because we have left handed system
  14. // DitherEnable
  15. bool dither_enable : DitherEnable = true;
  16. // FogEnable
  17. bool fog_enable : FogEnable = false;
  18. // FogColor
  19. float4 fog_color : FogColor = {0.f, 0.f, 0.f, 0.f};
  20. // Depth 
  21. bool z_enable : ZEnable = true;
  22. bool z_write_enable : ZWriteEnable = true;
  23. // Matrices for fixed function
  24. const matrix cMtxV : View;
  25. const matrix cMtxP : Projection;
  26. //---------------------------------------------------------------------------
  27. technique global_effect
  28. {
  29.     // Only one pass
  30.     pass p0
  31.     <
  32.         bool Drawable = false;
  33.     >
  34.     {
  35.         /*MaxAnisotropy[0] = 2;
  36.         MaxAnisotropy[1] = 2;
  37.         MaxAnisotropy[2] = 2;
  38.         MaxAnisotropy[3] = 2;
  39.         MaxAnisotropy[4] = 2;
  40.         MaxAnisotropy[5] = 2;
  41.         MaxAnisotropy[6] = 2;
  42.         MaxAnisotropy[7] = 2;*/
  43.     
  44.         // common matrices for one viewport
  45.         ViewTransform = <cMtxV>;
  46.         ProjectionTransform = <cMtxP>;
  47.     
  48.         ZEnable = <z_enable>;
  49.         ZWriteEnable = <z_write_enable>;
  50.         ZFunc = LESSEQUAL;
  51.         FillMode = <fill_mode>;
  52.         ShadeMode = GOURAUD;
  53.         AlphaTestEnable = true; // always enabled
  54.         AlphaRef = 0;
  55.         AlphaFunc = GREATEREQUAL;
  56.         AlphaBlendEnable = false;
  57.         SrcBlend = ONE;
  58.         DestBlend = ZERO;
  59.         CullMode = <cull_mode>;
  60.         DitherEnable = <dither_enable>;
  61.         FogEnable = <fog_enable>;
  62.         FogColor = <fog_color>;
  63.         SpecularEnable = false;
  64.         Lighting = false;
  65.         TextureFactor = 0xFFFFFFFF; // default texture factor is white
  66.         
  67.         // do not enable lod bias - fonts are bad! 
  68.         //MipMapLodBias[0] = -0.5f;
  69.         //MipMapLodBias[1] = -0.5f;
  70.     }
  71. }
  72.  
  73.  
  74.  
  75.